#include<iostream>
#include<vector>
#include<string>

using namespace std;

int main()
{
	string maxstr, minstr;
	vector<int> max, min;
	bool flag = 0;
	cin >> maxstr >> minstr;

	if (maxstr[0] == '-')
	{
		maxstr = maxstr.substr(1);
	}
	if (minstr[0] == '-')
	{
		minstr = minstr.substr(1);
	}

	if (maxstr == minstr)
	{
		cout << 0 << endl;
	}
	if (maxstr.size() < minstr.size() || (maxstr.size() == minstr.size() && max < min))
	{
		swap(maxstr, minstr);
		flag = 1;
	}
	for (int i = maxstr.size() - 1; i >= 0; i--)
	{
		max.push_back(maxstr[i] - '0');
	}
	for (int i = minstr.size() - 1; i >= 0; i--)
	{
		min.push_back(minstr[i] - '0');
	}

	vector<int> sum;
	sum.resize(max.size() + min.size(), 0);
	for (int i = 0; i < max.size(); i++)
	{
		if (i >= min.size())
		{
			sum[i] += max[i] + 0;
		}
		else
		{
			sum[i] += max[i] + min[i];
		}
		if (sum[i] > 9)
		{
			sum[i + 1] += 1;
			sum[i] %= 10;
		}
	}

	vector<int> sub;
	sub.resize(max.size() + min.size(), 0);
	for (int i = 0; i < max.size(); i++)
	{
		if (i >= min.size())
		{
			sub[i] += max[i] - 0;
		}
		else
		{
			sub[i] += max[i] - min[i];
		}
		if (sub[i] < 0)
		{
			sub[i + 1] -= 1;
			sub[i] *= -1;
		}
	}

	vector<int> mul;
	mul.resize(max.size() + min.size(), 0);
	for (int i = 0; i < min.size(); i++)
	{
		for (int j = 0; j < max.size(); j++)
		{
			mul[i + j] += max[j] * min[i];
			if (mul[i + j] > 9)
			{
				mul[i + j + 1] += mul[i + j] / 10;
				mul[i + j] %= 10;
			}
		}
	}


	return 0;
}